﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using Tencent.OA.App;

namespace Tencent.OA.ACM.Service.Host
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            try
            {
                ServiceManager.StartAllConfiguredServices();
            }
            catch (Exception ex)
            {
                LoggerProvider.CurrentLogger.Error(ex);
            }
        }

        protected override void OnStop()
        {
            try
            {
                ServiceManager.CloseAllServices();
            }
            catch (Exception ex)
            {
                LoggerProvider.CurrentLogger.Error(ex);
            }
        }
    }
}
